package org.grottarossa.ui.core.controls.searchuser;


import java.util.ResourceBundle;

import org.grottarossa.ui.core.ApplicationSession;
import org.grottarossa.ui.core.FormFieldLocation;
import org.grottarossa.ui.core.FormFieldProperties;
import org.grottarossa.ui.core.Notifier;
import org.grottarossa.ui.core.base.BaseForm;

import com.vaadin.ui.Field;
import com.vaadin.ui.Form;
import com.vaadin.ui.GridLayout;

/***
 * Maschera di filtraggio sulla ricerca di un utente/ruolo
 * @author 
 *
 */
public class SearchUserForm extends BaseForm
{
	public SearchUserForm(ApplicationSession appSession, ResourceBundle localizer)
	{
		super(appSession);
		m_layout = new GridLayout(2, 2);
		setLayout(m_layout);

		FormFieldProperties fieldProperties = new FormFieldProperties(new FormFieldLocation(0, 0));
		m_fieldsProperties.put("textfilter", fieldProperties);
		fieldProperties = new FormFieldProperties(new FormFieldLocation(1, 0));
		m_fieldsProperties.put("fieldfilter", fieldProperties);
		fieldProperties = new FormFieldProperties(new FormFieldLocation(0, 1, 1, 1));
		m_fieldsProperties.put("typefilter", fieldProperties);
		m_layout.setWidth("100%");
		setWriteThrough(true);
		setImmediate(true);

	    setFormFieldFactory(new SearchUserFormFieldFactory(appSession, localizer));
	}
}
